package com.health.httpbean;

import android.util.Log;

import com.blankj.utilcode.util.SPStaticUtils;
import com.blankj.utilcode.util.SPUtils;

/**
 * author : xiaoxin
 * date   : 2020/12/16 20:29
 * desc   :
 * update :
 */
public class HttpConstant {
//    public static final String sendFollowTable = "http://106.14.191.138:8181/wh/pad/sendFollowTable?creater=";//武汉洪山区
    public static final String sendFollowTable = "http://111.175.89.10:8181/wh/pad/sendFollowTable?creater=";//武汉洪山区
    //当前登录医生id
    public static final String _DOCTOR_ID = "_doctor_id";

//    public static final String http_url = "http://60.208.57.82:2227/Api/FollowUP/UPLoadData";
//    public static final String http_url = "http://106.53.212.110:8001/Api/PC/AndroidRegister";

    //档案注册接口
    //http://123.56.75.140:8089/Api/PC/AndroidRegister

    //正式环境
//    public static final String defaultURl = "http://123.56.75.140:8089";
    //测试环境
    public static final String defaultURl = "http://60.208.57.82:2227";

    /** 设置保存的 随访表上传接口地址 */
    public static final String sp_url = "sp_url";
    //机构行政区划
    public static final String sp_OrgCold = "sp_OrgCold";

    //档案注册接口
    public static final String AndroidRegister = "/Api/PC/AndroidRegister";
    //随访表数据上次接口
    public static final String UpLoadData = "/Api/FollowUP/UpLoadData";


    /*************************** 家医签约新增接口 start **********************************/
    //1、获取团队接口;2、团队人员接口  根据参数区分
    public static final String GetTeamAndUser = "/Api/FamilyDoctor/GetTeamAndUser";
    //3、获取签约包接口；4、获取签约包内容接口(暂时用不到) 根据参数区分
    public static final String GetService = "/Api/FamilyDoctor/GetService";
    //5、签约类型获取接口
    public static final String GetDictionary = "/Api/PC/GetDictionary";
    //6、上传签约信息
    public static final String UploadSigning = "/Api/FamilyDoctor/UploadSigning";

    // 升级接口
    public static final String queryNewApk = "http://txapi.yidehealthy.com/moon-api/api/apk/apkupdate/queryNewApk";
    public static final String Team = "Team";
    public static final String User = "User";
    public static final String Service = "Service";
    public static final String SFamilyTags = "SFamilyTags";
    //128版本是否启动过，因为127版本referral数据库 人员表 表结构有问题，需要在128版本先删除数据库  在重新拷贝一份
    public static final String first128 = "first128";
    /*************************** 家医签约新增接口 end **********************************/



    /**
     * 返回随访表档案注册接口
     * @return
     */
    public static String getHttpUrlAndroidRegister() {
        String url = SPStaticUtils.getString(HttpConstant.sp_url, defaultURl);
        return url + AndroidRegister;
    }

    /**
     * 随访表数据上传接口
     * @return
     */
    public static String getHttpUrlUpLoadData() {
        String url = SPStaticUtils.getString(HttpConstant.sp_url, defaultURl);
        Log.e("xiaoxin", "getHttpUrlUpLoadData: " +  url + UpLoadData);
        return url + UpLoadData;
    }

    /**
     * 返回随访表档案注册接口
     * @return
     */
    public static String getOrgCold() {
        String OrgCold = SPUtils.getInstance().getString(HttpConstant.sp_OrgCold,"");
        OrgCold = OrgCold + "00000000000000";
//        return "510322000000";
//        return "510623100000";
        return OrgCold.substring(0,12);
    }

    /**
     * 1、获取团队接口;2、团队人员接口
     * @return
     */
    public static String GetTeamAndUser() {
        String url = SPStaticUtils.getString(HttpConstant.sp_url, defaultURl);
        return url + GetTeamAndUser;
    }

    /**
     * 3、获取签约包接口；4、获取签约包内容接口(暂时用不到) 根据参数区分
     * @return
     */
    public static String GetService() {
        String url = SPStaticUtils.getString(HttpConstant.sp_url, defaultURl);
        return url + GetService;
    }

    /**
     * 5、签约类型获取接口
     * @return
     */
    public static String GetDictionary() {
        String url = SPStaticUtils.getString(HttpConstant.sp_url, defaultURl);
        return url + GetDictionary;
    }

    /**
     * 5、签约类型获取接口
     * @return
     */
    public static String UploadSigning() {
        String url = SPStaticUtils.getString(HttpConstant.sp_url, defaultURl);
        return url + UploadSigning;
    }



}
